#pragma once

#include <QObject>
#include <QVariantMap>

#include "Base\AbstractRemoteProcedure.h"
#include "Network/Connection.h"

namespace TC
{
	namespace Request
	{
		class TCCORE_EXPORT NewsManager : public AbstractRemoteProcedure
		{
			Q_OBJECT
		public:
			Q_INVOKABLE void add(quint64 groupId, const QVariantMap &news);
			Q_INVOKABLE void update(const QVariantMap &news);
			Q_INVOKABLE void remove(quint64 id);
		protected:
			void onDataReady(QDataStream &stream) override;
		};
	}
}